<?php
// $Id: results.tpl.php,v 1.5 2007/10/11 09:51:29 goba Exp $
global $base_url,$language;
  $url = $base_url . '/' . drupal_get_path('module', 'service');
  $catname = '';
//print_r($language);
//print "<pre>";print_r($items); print"</pre>";
 // print $catid;
if($language->language=='ta'){
	$lang= '/ta';
}else{
 $lang='';
}
?>
		<?php  foreach($items as $row){
		  $cat = $row->field_src_cate['und'][0]['value'];
				my_db_change(1);
				$query = db_query("select cate_name from category_mst where cate_id =$catid");
				foreach($query  as $key){
					$catname = $key->cate_name;
				}
				my_db_change(0);

		 } ?>
		 <?php if($catname !=''){ ?>
		<div class="res_dept"><span>
			<strong><?php echo t($catname)?></strong></span>
			<span style="float:right;margin-right:23px;">
			<a href="<?php print $base_url.$lang;?>/service/deptname"><?php print t('Back')?></a></span>
		</div>
		<?php } ?>
		<?php $i=0; ?>
		<?php  foreach($items as $row){?>
			<div class="res_title_ch" style="">
				 <p><a href='<?php echo $base_url.$lang;?>/service/dept/<?php  echo $row->nid.'/'.$row->field_src_org['und'][0]['value']; ?>'>
						<?php echo  t($row->title) ?>
					</a>
				 </p>
			</div>
			<?php $i++; ?>
		<?php } ?>
		<?php if($i == '0'){?>
			 <div class="no_record"><?php echo t('No Results Found')?> </div>
	<?php	} ?>
